#ifndef DATATYPE_H
#define DATATYPE_H

/*
**********************************************************************************************************
*                                              DATA TYPES
*                                         (Compiler Specific)
**********************************************************************************************************
*/
typedef unsigned char  BOOLEAN;
typedef unsigned char  INT8U;                       /* Unsigned  8 bit quantity                         */
typedef signed   char  INT8S;                       /* Signed    8 bit quantity                         */
typedef unsigned int   INT16U;                      /* Unsigned 16 bit quantity                         */
typedef signed   int   INT16S;                      /* Signed   16 bit quantity                         */
typedef unsigned long  INT32U;                      /* Unsigned 32 bit quantity                         */
typedef signed   long  INT32S;                      /* Signed   32 bit quantity                         */
typedef float FP32;                        /* Single precision floating point                  */

typedef unsigned char OS_STK;                      /* Each stack entry is 8-bit wide                   */
typedef unsigned char OS_CPU_SR;                /* Define size of CPU status register (PSW = 8 bits)   */

typedef INT16U OS_FLAGS;    /* Data type for event flag bits (8, 16 or 32 bits)             */

#define TRUE                      1
#define FALSE                     0
#define NULL          0

#define SETBIT(x, y)   	   (x |= (1 << y))
#define CLEARBIT(x, y) 	   (x &= ~(1 << y))
#define CHECKBIT(x, y) 	   (x & (1 << y))
#define TBIT(a,b)     ((a)&(1<<(b)))

#endif
